﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BackGroundMoveScript : MonoBehaviour {
    public float AboutCameraSpeed = 1f;

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
        if (CameraScript.sCameraScript != null)
        {
            float cameraX = AboutCameraSpeed * CameraScript.sCameraScript.transform.position.x;
            this.transform.position = new Vector3(cameraX, this.transform.position.y, this.transform.position.z);
        }
	}
}
